package com.yunchi.controller;


import com.yunchi.service.MonitorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: Crazer
 * @Date: 2023/7/3 15:50
 * @version: 1.0.0
 * @Description:
 */
@RestController
public class MonitorController {

    @Autowired
    private MonitorService monitorService;

    @GetMapping(value = "/monitor")
    public Object monitor() {
        boolean result = monitorService.monitor();
        return result ? "success" : "fail";
    }

    @GetMapping(value = "/")
    public Object index() {
        return "index";
    }
}
